<template>
    <!-- 加入社团 -->
    <div style="width:100%;height:100%;background-color:#F8F8FF">
      
      <div style="width:99%;height:100%" class="container">
        <!-- 该学生未加入任何社团 -->
        <el-table
          :data="tableData"
          stripe
          border
          style="width: 100%;margin-top:20px">
          <el-table-column
            prop="id"
            label="序号"
            width="100px"
            align="center">
          </el-table-column>
          <el-table-column
            prop="assName"
            label="社团名称"
            width="180"
            align="center">
          </el-table-column>
          <el-table-column
            prop="student.stuName"
            label="社团负责人"
            width="180"
            align="center">
          </el-table-column>
          <el-table-column
            prop="student.stuTelephone"
            label="联系方式"
            width="180"
            align="center">
          </el-table-column>
          <el-table-column
            prop="assPeopleNum"
            label="社团人数"
            width="100"
            align="center">
          </el-table-column>
          <el-table-column
            prop="assIntroduce"
            label="社团宗旨"
            align="center">
          </el-table-column>
          <el-table-column
            label="操作"
            align="center"
            width="150px">
            <el-button round v-if="t==true">加入社团</el-button>
            <span v-if="t==false">已加入该社团</span>
          </el-table-column>
        </el-table>

      </div>
    </div>
</template>


<script>
  export default {
    methods: {
     
    },

    data() {
      return {
        tableData: [],
        t:true
      }
    },
    created(){
      this.lookupAllAssInfor();
    },
    methods:{
     
      // 查看全部的社团详情;
      lookupAllAssInfor(){
          this.$axios.get("http://localhost:8081/user/lookupAss",{
              params:{
                  
              } 
          }).then(res=>{
              this.tableData=res.data.data;
              console.log(this.tableData);
          })
      }
    }
  }
</script>